package com.chance.cc.crawler.development.command.publish.dahe;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.dahe.DaHeRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.dahe.DaHeTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.script.dahe.DaHeCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.dahe.DaHeCrawlerTriggerInfo;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2021/3/12 16:51
 * @Description
 *      大河网
 **/
public class DaHePublishCrawlerJob {
    private static final String domain = "dahe";

    public static void main(String[] args) {
//        publishSimpleCrawlerJob();

        publishRealtimeCrawlerJob();
        publishTraceCrawlerJob();
        DaHeCrawlerScript.publishCrawlerNodeScript();
    }

    private static void publishSimpleCrawlerJob(){
        CrawlerJob crawlerJob = DaHeRealtimeCrawlerSchedulerJob.crawlerSchedulejob();
        DaHeCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"大河网");
    }

    private static void publishRealtimeCrawlerJob(){
        CrawlerJob crawlerJob = DaHeRealtimeCrawlerSchedulerJob.crawlerSchedulejob();
        DaHeCrawlerTriggerInfo.realtimeCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"大河网");
    }

    private static void publishTraceCrawlerJob(){
        CrawlerJob crawlerJob = DaHeTraceCrawlerSchedulerJob.crawlerSchedulejob();
        DaHeCrawlerTriggerInfo.traceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"大河网");
    }
}
